/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Command;

import Proxy.FileInterface;
import Proxy.MyFile;
import java.io.File;

/**
 *
 * @author Andreea
 */
public class DeleteCommand extends AbstractCommand{
    private FileInterface file;
    public DeleteCommand(FileInterface file){
        this.file=file;
    }
    @Override
    public boolean doCommand() {
        MyFile f=(MyFile) file;
        File fdisk=new File(f.getPath());
        if (fdisk.delete())
            return true;
        else
            return false;
    }

    @Override
    public boolean undo() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
}
